From 039950d904b0a95d1ae6238cd3c80013756adad9 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Thu, 25 Feb 2010 11:52:23 +0000 Subject: [PATCH] libxc: Pre-zero argument structures for map/unmap_pirq operations. From: Yunhong Jiang Signed-off-by: Keir Fraser --- tools/libxc/xc_physdev.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/libxc/xc_physdev.c b/tools/libxc/xc_physdev.c index 00ac829afa..dd484a1bae 100644 --- a/tools/libxc/xc_physdev.c +++ b/tools/libxc/xc_physdev.c @@ -31,6 +31,7 @@ int xc_physdev_map_pirq(int xc_handle, if ( !pirq ) return -EINVAL; + memset(&map, 0, sizeof(struct physdev_map_pirq)); map.domid = domid; map.type = MAP_PIRQ_TYPE_GSI; map.index = index; @@ -59,6 +60,7 @@ int xc_physdev_map_pirq_msi(int xc_handle, if ( !pirq ) return -EINVAL; + memset(&map, 0, sizeof(struct physdev_map_pirq)); map.domid = domid; map.type = MAP_PIRQ_TYPE_MSI; map.index = index; @@ -83,6 +85,7 @@ int xc_physdev_unmap_pirq(int xc_handle, int rc; struct physdev_unmap_pirq unmap; + memset(&unmap, 0, sizeof(struct physdev_unmap_pirq)); unmap.domid = domid; unmap.pirq = pirq; -- 2.30.2